<?php
/**
 * mint配置类
 *
 * @version $Id: IMintConfig.php 312 2008-04-23 16:29:38Z iwind $
 * @package util.mint
 */
class IMintConfig extends IObject {
	/**
	 * XML格式
	 *
	 */
	const XML_FORMAT = "xml";
	
	/**
	 * HTML格式
	 *
	 */
	const HTML_FORMAT = "html";
	
	public static $formatConfig = array (
					self::XML_FORMAT => array("extension"=>".xml"),
					self::HTML_FORMAT => array("extension"=>".html")
				);
	
	/**
	 * 格式用文本的表示方法
	 *
	 * @var array
	 */
	public static $formatTexts = array(
				"xml" => self::XML_FORMAT,
				"html" => self::HTML_FORMAT
			);
	
	/**
	 * 格式对应的类
	 *
	 * @var array
	 */
	public static $formats = array(
				self::XML_FORMAT => "IMintXMLDocument",
				self::HTML_FORMAT => "IMintHTMLDocument"
			);
			
	/**
	 * 支持的组件列表
	 *
	 * @var array
	 */
	public static $components = array(
				"@unknown" => array(
						"class" => "IMintUnknownComponent",
						"prefix" => "tx"
					),
				"@foreach" => array(
						"class" => "IMintForeachComponent",
						"prefix" => "tx"
					),
				"@include" => array(
						"class" => "IMintIncludeComponent",
						"prefix" => "tx"
					),
				"@if" => array(
						"class" => "IMintIfComponent",
						"prefix" => "tx"
					),
				"@assert" => array(
						"class" => "IMintAssertComponent",
						"prefix" => "tx"
					),
				"@else" => array(
						"class" => "IMintElseComponent",
						"prefix" => "tx"
					),
				"@insert" => array(
						"class" => "IMintInsertComponent",
						"prefix" => "tx"
					),
				"@options" => array(
						"class" => "IMintOptionsComponent",
						"prefix" => "html"
					),
				"@checkboxs" => array( 
						"class" => "IMintCheckboxsComponent",
						"prefix" => "html"
					),
				"@radios" => array(
						"class" => "IMintRadiosComponent",
						"prefix" => "html"
					),
				"@step" => array(
						"class" => "IMintStepComponent",
						"prefix" => "tx"
					),
				"@pager" => array(
						"class" => "IMintPagerComponent",
						"prefix" => "tx"
					),
				"@var" => array(
						"class" => "IMintVarComponent",
						"prefix" => "tx"
					),
				"@layout" => array(
						"class" => "IMintLayoutComponent",
						"prefix" => "html"
					),
				"@php" => array(
						"class" => "IMintPHPComponent",
						"prefix" => "tx"
					),
				"@literal" => array(
						"class" => "IMintLiteralComponent",
						"prefix" => "tx"
					),
				"@switch" => array(
						"class" => "IMintSwitchComponent",
						"prefix" => "tx"
					),
				"@case" => array(
						"class" => "IMintCaseComponent",
						"prefix" => "tx"
					),
				"@fetch" => array( 
						"class" => "IMintFetchComponent",
						"prefix" => "tx"
					)
			);
			
	/**
	 * 支持的修饰符
	 *
	 * @var array
	 * @since 0.0.2
	 */
	public static $modifiers  = array(
				"lower" => "IMintLowerModifier",
				"upper" => "IMintUpperModifier",
				"default" => "IMintDefaultModifier",
				"capitalize" => "IMintCapitalizeModifier",
				"cat" => "IMintCatModifier",
				"date_format" => "IMintDateFormatModifier",
				"print" => "IMintPrintModifier",
				"escape" => "IMintEscapeModifier",
				"indent" => "IMintIndentModifier",
				"regex_replace" => "IMintRegexReplaceModifier",
				"replace" => "IMintReplaceModifier",
				"spacify" => "IMintSpacifyModifier",
				"string_format" => "IMintStringFormatModifier",
				"left" => "IMintLeftModifier",
				"right" => "IMintRightModifier",
				"simple_text_format" => "IMintSimpleTextFormatModifier"
			);
	
	/**
	 * 组件所在节点的属性名称
	 * 
	 * 用来在文档中查找组件节点
	 *
	 * @var String
	 */
	public static $componentAttributeName = "com";
	
	/**
	 * 组件所在节点是否保留属性名
	 *
	 * keep为false时将会把组件所在的节点自动删除，但保留其中的子节点
	 * 
	 * @var String
	 */
	public static $nodeKeepAttributeName = "x-keep";
	
	/**
	 * 所能解析的最大层次
	 * 
	 * 设置该值的目的是防止在模板中的嵌套导致无限循环
	 *
	 * @var int
	 */
	public static $maxParseLevel = 20;
	
	/**
	 * 变量标识符
	 *
	 * 目前支持@和$两种，所以模板中的可以使用 @varname 或 $varname 来访问变量
	 * 
	 * @var string
	 * @since 0.0.2
	 */
	public static $variableMarkArray = array("@", "\$", "%24"); // %24 == $
	
	/**
	 * Mint版本号
	 *
	 */
	const VERSION = "mint 0.0.3";
}


?>